extends IEventBehavior


class_name HitPenetrate
"""
穿透效果
"""


@export_flags_2d_physics var hit_layer: int = 0


func support() -> Array:
    return [CharacterUnit.Event.ON_HIT_SOMETHING]

## 处理武器命中事件,返回是否取消销毁子弹
func do_event(character: CharacterComponent, v: EffectValue, e: CharacterEvent) -> void:
    if BehaviorHelper.is_layer(hit_layer, e):
        v.value -= 1
        e.cancel()
